import request from '@/utils/request'

const api = {
  getBasePersonUrl: '/base_person/get_base_person',
  syncPersonUrl: '/base_person/sync_person',
  changePersonUrl: '/base_person/change_person',
  getBasePersonPageUrl: '/base_person/get_base_person_page',
}

export async function getBasePersonPageApi(params: Map<string, any>) {
  const res = await request({
    url: api.getBasePersonPageUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function changePersonApi(params: Map<string, any>) {
  const res = await request({
    url: api.changePersonUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function getBasePersonApi(params: Map<string, any>) {
  const res = await request({
    url: api.getBasePersonUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function syncPersonApi(params: Map<string, any>) {
  const res = await request({
    url: api.syncPersonUrl,
    method: 'get',
    data: params,
  })
  return res
}
